package com.infore.siteManagement.repository.equipment;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.infore.siteManagement.entity.equipment.EquipAndReagent;

@Repository
public interface IEquipAndReagentRepository
		extends JpaRepository<EquipAndReagent, String>, JpaSpecificationExecutor<EquipAndReagent> {

	@Modifying
	@Transactional
	int deleteByIdIn(List<String> ids);

	@Modifying
	@Transactional
	@Query(value = "delete from EQUIP_AND_REAGENT where EQUIP_MODEL_ID in(:ids)", nativeQuery = true)
	int nativedelByIdIn(@Param("ids") List<String> ids);
}
